package com.wangsd.web.coupon.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.wangsd.web.coupon.entity.BusinessCoupon;
import com.wangsd.web.coupon.entity.Member;
import com.wangsd.web.coupon.entity.Product;
import com.wangsd.web.coupon.entity.TOrder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface WxMiniPayService {

    /**
     * 微信支付
     */
    Object wxPay(String address,Product product, String miniAppId, Member member, HttpServletRequest request) throws Exception;

    /**
     * 微信支付购买商家券
     */
    Object wxBusinessCouponPay(String address, BusinessCoupon businessCoupon, String miniAppId, Member member, HttpServletRequest request) throws Exception;

    /**
     * 微信回调通知
     */
    void wxNotify(HttpServletRequest request, HttpServletResponse response)  throws Exception;

    /**
     * 微信购买商家券支付回调
     */
    void wxBusinessCouponNotify(HttpServletRequest request, HttpServletResponse response)  throws Exception;

    /**
     * 领取商家券回调通知
     */
    void getBusinessCouponNotify(HttpServletRequest request, HttpServletResponse response)  throws Exception;

    /**
     * 微信小程序退款
     */
    String refund(TOrder tOrder,String miniAppId, String orderId, HttpServletRequest request) throws WxPayException,Exception;

    /**
     * 微信商家券退款
     */
    String businessRefund(TOrder tOrder,String miniAppId, String orderId, HttpServletRequest request) throws WxPayException,Exception;



    /**
     * 积分兑换
     */
    Integer exchangePoints(Product product,String miniAppId,Member member) throws Exception;
}
